package day6;
import java.util.Scanner;
public class D6_1 {
    public static void main(String[] args) {
       double sum=qiuhe();//调用“qiuhe”
        System.out.println(sum);
        chengfabiao();//调用“chengfabiao".
    }
   public static double qiuhe(){
        Scanner a=new Scanner(System.in);
       System.out.println("请输入第一个数或小数：");
       double num1=a.nextDouble();
       System.out.println("请输入第二个数或小数：");
       double num2=a.nextDouble();
       return num1+num2;
   }
   public static void chengfabiao(){
       System.out.println("请输入n的值：");
       Scanner b=new Scanner(System.in);
       int n=b.nextInt();
       for (int i=1;i<=n;i++){
           for(int q=1;q<=i;q++){
               int result=q*i;
               System.out.print(q+"*"+i+"="+result+" ");
           }
           System.out.println();
       }
   }
}


